<?php
namespace Service;

use Hoa\Registry\Registry;
use Illuminate\Database\Capsule\Manager as DB;


/**
 * TestService
 * @author los_gsy
 */
class TestService extends BaseService {
	/**
	 * 构造函数
	 */
	public function __construct() {
		parent::__construct();
	}


	/**
	 * test
	 */
	static public function test() {
		return __METHOD__;
	}


	/**
	 * 返回数组
	 */
	static public function getArr() {
		$conf = Registry::get('conf');
		$ret = $conf['status'][200];
		return $ret;
	}


	/**
	 * 查询配置
	 * @param int $id
	 */
	static public function getCnf($id) {
		$sql = 'select * from t_cnf where id = :id limit 1';
		$param = ['id' => $id];
		$result = DB::select($sql, $param);
		return $result;
	}
}